﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using Newtonsoft.Json;
using Quizz.Library.Helper;

namespace Quizz.Library.Common
{
    public sealed class CommonMethods
    {
        public static JsonResult CreateJson(object data, bool allowGet = true)
        {
            return new JsonNetResult(data, allowGet);
        }

        public static JsonResult CreateJson(object data)
        {
            return new JsonNetResult(data);
        }

        public static JsonResult CreateJson(object data, bool allowGet, JsonSerializerSettings settings)
        {
            return new JsonNetResult(data, allowGet, settings);
        }
    }
}
